﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace RoboTrocity {
	public class Point {
		private int x;
		private int y;

		public Point()
			: this(0, 0) {}

		public Point(int _x, int _y) {
			x = _x;
			y = _y;
		}

		public int X {
			get { return x; }
			set { x = value; }
		}

		public int Y {
			get { return y; }
			set { y = value; }
		}

		#region Static Functions
		public static Point operator +(Point p1, Point p2) { 
			return new Point(p1.X + p2.X, p1.Y + p2.Y);
		}

		public static Point operator +(Point p1, Vector2 v1) {
			return new Point(p1.X + (int)v1.X, p1.Y + (int)v1.Y);
		}

		public static Point operator -(Point p1, Point p2) {
			return new Point(p1.X - p2.X, p1.Y - p2.Y);
		}

		public static bool operator ==(Point p1, Point p2) {
			return (p1.X == p2.X && p1.Y == p2.Y); 
		}

		public static bool operator !=(Point p1, Point p2) {
			return (p1.X != p2.X || p1.Y != p2.Y); 
		}

		public static Point Zero {
			get { return new Point(0, 0); }
		}
		#endregion

	}
}
